package org.jeecg.modules.goldentry.service.impl;

import java.util.List;

import org.jeecg.modules.goldentry.entity.GoldEntry;
import org.jeecg.modules.goldentry.mapper.GoldEntryMapper;
import org.jeecg.modules.goldentry.service.IGoldEntryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description:  金出入库
 * @Author: jerryzhu
 * @Date:   2021-11-15
 * @Version: V1.0
 */
@Service
public class GoldEntryServiceImpl extends ServiceImpl<GoldEntryMapper, GoldEntry> implements IGoldEntryService {
	
	@Autowired
	GoldEntryMapper goldEntryMapper;
	
	/**
	 * 查询金出入库明细分页
	 */
	@Override
	public IPage<GoldEntry> selectGoldEntryPage(Page<GoldEntry> page, QueryWrapper<GoldEntry> queryWrapper) {
		return goldEntryMapper.selectGoldEntryPage(page, queryWrapper);
	}

	/**
	 * 查询仓库库存数据列表，不分页*
	 */
	@Override
	public List<GoldEntry> getGoldEntryStorageSummaryList(String storageId) {
		return goldEntryMapper.getGoldEntryStorageSummaryList(storageId);
	}
	
	/**
	 * 查询员工库存数据列表，不分页*
	 */
	@Override
	public List<GoldEntry> getGoldEntryPersonSummaryList(String userName) {
		return goldEntryMapper.getGoldEntryPersonSummaryList(userName);
	}

	/**获取仓库名字*/
	@Override
	public String getStorageName(String id) {
		return goldEntryMapper.getStorageName(id);
	}
	
}
